/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Harold
 */
@Entity
@Table(name = "type_dealer")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TypeDealer.findAll", query = "SELECT t FROM TypeDealer t"),
    @NamedQuery(name = "TypeDealer.findByIdTypeDealer", query = "SELECT t FROM TypeDealer t WHERE t.idTypeDealer = :idTypeDealer"),
    @NamedQuery(name = "TypeDealer.findByDescription", query = "SELECT t FROM TypeDealer t WHERE t.description = :description"),
    @NamedQuery(name = "TypeDealer.findByDiscPer", query = "SELECT t FROM TypeDealer t WHERE t.discPer = :discPer"),
    @NamedQuery(name = "TypeDealer.findByStatus", query = "SELECT t FROM TypeDealer t WHERE t.status = :status")})
public class TypeDealer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_type_dealer")
    private Integer idTypeDealer;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 256)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "disc_per")
    private float discPer;
    @Basic(optional = false)
    @NotNull
    @Column(name = "status")
    private boolean status;

    public TypeDealer() {
    }

    public TypeDealer(Integer idTypeDealer) {
        this.idTypeDealer = idTypeDealer;
    }

    public TypeDealer(Integer idTypeDealer, String description, float discPer, boolean status) {
        this.idTypeDealer = idTypeDealer;
        this.description = description;
        this.discPer = discPer;
        this.status = status;
    }

    public Integer getIdTypeDealer() {
        return idTypeDealer;
    }

    public void setIdTypeDealer(Integer idTypeDealer) {
        this.idTypeDealer = idTypeDealer;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public float getDiscPer() {
        return discPer;
    }

    public void setDiscPer(float discPer) {
        this.discPer = discPer;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTypeDealer != null ? idTypeDealer.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TypeDealer)) {
            return false;
        }
        TypeDealer other = (TypeDealer) object;
        if ((this.idTypeDealer == null && other.idTypeDealer != null) || (this.idTypeDealer != null && !this.idTypeDealer.equals(other.idTypeDealer))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.TypeDealer[ idTypeDealer=" + idTypeDealer + " ]";
    }
    
}
